<%--
  Created by IntelliJ IDEA.
  User: SimonZou
  Date: 16/4/13
  Time: 上午11:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>创耕展会管理平台</title>
    <link  rel="shortcut icon" href="${ctx}/image/Orange_Fruit_48px.ico" mce_href="${ctx}/image/Orange_Fruit_48px.ico" type="image/x-icon" >
    <link href="${ctx}/adminlte/css/style.css" rel="stylesheet">
    <link href="${ctx}/adminlte/css/style-responsive.css" rel="stylesheet">
    <script src="${ctx}/adminlte/js/jquery-1.10.2.min.js"></script>
    <script src="${ctx}/adminlte/js/bootstrap.min.js"></script>
    <script src="${ctx}/adminlte/js/modernizr.min.js"></script>
    <script language="JavaScript">
        $(function () {
            $('#loginBut').click(function () {
                <%--$.post('${ctx}/admin/doLogin.do',--%>
                        <%--{'userInfo.username':$('#userName').val()},--%>
                <%--function(data,status){--%>
                    <%--var obj = data;--%>
                    <%--console.log(obj.code);--%>
                    <%--console.log(data[0]['code']);--%>
                   <%--if(data[0].code==1){--%>
                       <%--window.location.href="${ctx}/admin/main.do";--%>
                   <%--}--%>
                <%--});--%>

                $.ajax({
                    url: '${ctx}/admin/doLogin.do',
                    type: 'post',
                    data:{'userInfo.username':$('#userName').val()},
                    success:function(data){
                        console.log(data.code==1);
                        if(data.code==1){
                            window.location.href="${ctx}/admin/main.do";
                        }
                    }
                });
            });
        })
    </script>
</head>
<body class="login-body">

<div class="container">

    <form class="form-signin" action="http://view.jqueryfuns.com/2014/4/10/7_df25ceea231ba5f44f0fc060c943cdae/index.html">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">登 录</h1>
            <img src="${ctx}/adminlte/images/login-logo.png" alt=""/>
        </div>
        <div class="login-wrap">
            <input type="text" class="form-control" placeholder="用 户 名" autofocus id="userName">
            <input type="password" class="form-control" placeholder="密    码">

            <button class="btn btn-lg btn-login btn-block" type="button" id="loginBut">
                <i class="fa fa-check"></i>
            </button>

            <div class="registration">
                 没 有 账 号 ?
                <a class="" href="registration.html">
                    注  册
                </a>
            </div>
            <label class="checkbox">
                <input type="checkbox" value="remember-me"> Remember me
                <span class="pull-right">
                    <a data-toggle="modal" href="#myModal"> Forgot Password?</a>

                </span>
            </label>

        </div>

        <!-- Modal -->
        <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Forgot Password ?</h4>
                    </div>
                    <div class="modal-body">
                        <p>Enter your e-mail address below to reset your password.</p>
                        <input type="text" name="email" placeholder="Email" autocomplete="off" class="form-control placeholder-no-fix">

                    </div>
                    <div class="modal-footer">
                        <button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
                        <button class="btn btn-primary" type="button">Submit</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- modal -->

    </form>

</div>



<!-- Placed js at the end of the document so the pages load faster -->

<!-- Placed js at the end of the document so the pages load faster -->


</body>
</html>